﻿@using GSLMS.Entity.Enum
@model IEnumerable<GSLMS.Entity.TB_LOAN_MAIN>
@{
    Layout = null;
    ViewBag.ViewTitle = "待出款列表";
    int i = 1;
    var SearchParma = ViewData["SearchParma"] as GSLMS.Entity.TB_LOAN_MAIN ?? new GSLMS.Entity.TB_LOAN_MAIN();
    var ddlStatus = ViewData["Status"] as SelectList;

    SearchParma.SIGNDATE = DateTime.Now.AddMonths(-1);
    SearchParma.SIGNDATE_END = DateTime.Now;    
}
<form id="pagerForm" method="get" action="DianDang/FKApply/Loaning/index?action=page&OpID=@ViewData["OperateID"]">
<input type="hidden" name="pageNum" value="1" />
<input type="hidden" name="numPerPage" value="@ViewData["pageSize"]" />
<input type="hidden" name="RowCount" value="@ViewData["RowCount"]" />
<input type="hidden" name="CUSTNAME" value="@SearchParma.CUSTNAME" />
<input type="hidden" name="LOANDATE" value="@SearchParma.LOANDATE" />
<input type="hidden" name="LOANDATE_END" value="@SearchParma.LOANDATE_END" />
<input type="hidden" name="APPLYDATE" value="@SearchParma.APPLYDATE" />
<input type="hidden" name="APPLYDATE_END" value="@SearchParma.APPLYDATE_END" />
<input type="hidden" name="STATUS" value="@SearchParma.STATUS" />
</form>
<div class="pageHeader">
    <form onsubmit="return navTabSearch(this)" id="Form_@ViewData["CurrentController"]" action="DianDang/FKApply/Loaning/index?action=search&OpID=@ViewData["OperateID"]"
    method="post">
    <div class="searchBar">
        <table class="searchContent">
            <tr>
                <td>
                    客户名称：
                </td>
                <td>
                    @Html.TextBox("CUSTNAME", SearchParma.CUSTNAME)
                </td>
                <td>
                    出款申请日期：
                </td>
                <td>
                    @Html.TextBox("APPLYDATE", SearchParma.APPLYDATE, new { @class = "date", format = "yyyy-MM-dd", @maxDate = "%y-%M-%d", @readonly = "true", formatDate = "yyyy-MM-dd" })
                </td>
                <td>
                    ~
                    @Html.TextBox("APPLYDATE_END", SearchParma.APPLYDATE_END, new { @class = "date", format = "yyyy-MM-dd", @maxDate = "%y-%M-%d", @readonly = "true", formatDate = "yyyy-MM-dd" })
                </td>
                <td>
                    状态:
                </td>
                <td>
                    @Html.DropDownList("Status", ddlStatus, GSLMS.WebAPP.HelperCommon.SelectDefaultValue, new { @class = "combox" })
                </td>
            </tr>
            <tr>
                <td>
                    实际放款日期：
                </td>
                <td colspan="5">
                    @Html.TextBox("LOANDATE", SearchParma.LOANDATE, new { @class = "date", format = "yyyy-MM-dd", @maxDate = "%y-%M-%d", @readonly = "true", formatDate = "yyyy-MM-dd" })
                                    ~
                    @Html.TextBox("LOANDATE_END", SearchParma.LOANDATE_END, new { @class = "date", format = "yyyy-MM-dd", @maxDate = "%y-%M-%d", @readonly = "true", formatDate = "yyyy-MM-dd" })
                </td>
                <td align="right">
                    <div class="subBar">
                        <ul>
                            <li>
                                <div class="buttonActive">
                                    <div class="buttonContent">
                                        <button type="submit" name="submit">
                                            检索</button></div>
                                </div>
                            </li>
                            <li>
                                <div class="buttonActive">
                                    <div class="buttonContent">
                                        <button type="reset" name="reset">
                                            重置</button></div>
                                </div>
                            </li>
                        </ul>
                    </div>
                </td>
            </tr>
        </table>
    </div>
    </form>
</div>
<div class="pageContent">
    @Html.Partial("Buttons")
    <table class="list" width="100%" layouth="120">
        <thead>
            <tr class="header">
                <th>
                    客户名称
                </th>
                <th>
                    贷款号
                </th>
                <th>
                    项目经理
                </th>
                <th>
                    贷款产品
                </th>
                <th>
                    贷款金额
                </th>
                <th>
                    合同签订日期
                </th>
                <th>
                    出款申请日期
                </th>
                <th>
                    出款申请人
                </th>
                <th>
                    出款时间
                </th>
                <th>
                    状态
                </th>
            </tr>
        </thead>
        @foreach (var item in Model)
        {            
            <tr target="LoanedApply_id" rel="@item.CONID">
                <td>
                    @item.CUSTNAME
                </td>
                <td>
                    @item.LOANNO
                </td>
                <td>
                    @item.SALESMAN
                </td>
                <td>
                    @item.PRODUCTNAME
                </td>
                <td>
                    @item.AMOUNT
                </td>
                <td>
                    <span formatdate="yyyy-MM-dd">@item.SIGNDATE</span>
                </td>
                <td>
                    <span formatdate="yyyy-MM-dd">@item.APPLYDATE</span>
                </td>
                <td>@item.APPLYBYNAME
                </td>
                <td>@((ApplyEnum.MainStatus)item.STATUS)
                </td>
            </tr>
            i += 1;
        }
    </table>
</div>
@Html.Partial("PageBar")
